<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateStudent extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('student', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('real_name', 255)->default('')->comment("真实姓名");
            $table->string('nickname', 255)->default('')->comment("用户昵称");
            $table->string('open_id', 80)->default('')->comment('open_id');
            $table->string('images', 500)->default('')->comment('微信头像');
            $table->string('phone',60)->default('')->comment("手机号");
            $table->string('country', 255)->default('')->comment('国家');
            $table->string('province', 255)->default('')->comment('地区');
            $table->string('city', 255)->default('')->comment('城市');
            $table->tinyInteger('sex')->default(3)->comment("性别 1男，2女，3未知");
            $table->tinyInteger('member_status')->default(0)->comment("是否会员 0否，1是");
            $table->tinyInteger('status')->default(0)->comment("状态 0启用，1禁用");
            $table->integer('created_at')->default(0)->comment("创建时间");
            $table->index('status');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('student');
    }
}
